package com.gltc.framework;

import javax.sql.DataSource;

import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@Configuration
public class DataSourceConfig {

	@Bean(name = "mysqltc")
	@Primary
	@ConfigurationProperties(prefix = "spring.dsgltc")
	public DataSource mysqlgltcDataSource() {
		return DataSourceBuilder.create().build();
	}

	@Bean(name = "oracletc")
	@ConfigurationProperties(prefix = "gltc.oracle")
	public DataSource oraclegltcDataSource() {
		return DataSourceBuilder.create().build();
	}

}
